Skip to main content

All Questions

Tagged with
-2votes
1answer
72views

Parse txt file on basis of occurrence of a tag in Linux

I am trying to parse a txt file containing xml "messages"in linux, something like this <Document abc xyz .....> <hji> xyz </hji> </Document> <Document abc xyz ........
python6's user avatar
1vote
2answers
449views

Extract IP:PORT from a curl output

I want to get list ip:port from the curl output of curl https://www.gametracker.com/search/?sort=5&order=ASC I cannot post the whole output as it is very big, just posting the part from where we ...
ph3ro's user avatar
-1votes
3answers
215views

Extracting SMS data from a XML

I have a large xml file of my SMS messages. I want to put them into an easily accessible csv format. I've been trying to extract the 'address', 'messageBody' and 'messageTime' sections specifically ...
Luke's user avatar
0votes
1answer
846views

Getting specific entries of a log file using awk

I'm currently trying to use awk to grab items from massive log files matching specific criteria. Essentially, I need to be able to pull the entire command, marked by a transaction ID, based on ...
Brickscrap's user avatar
1vote
2answers
2kviews

How may I replace a string in an XML file?

I am trying to replace the string inside an XML file. From <hello="value" exampleno="xxxx:yyyyyyyy/dd=eeeee-ffffff,aa=bb ccc,dd=eeee,ff=gggg,hh=iii,jj=kkk,ll=mmmm" /> I want ...
Ganesh's user avatar
3votes
3answers
531views

Identify strings between patterns and print entire region between pattern if string is found. Perferably using awk

There are similar questions but none of them quite address the issue I have. Simply put, I need to print every block that contains any string I'm looking for. Each block start line contains: <entry ...
Giles's user avatar
-2votes
2answers
402views

I need to update a tag <abc><\abc> with variables from another file. Output should be an xml file with all those values comma separated within abc tag

I need help updating an xml file, file1.xml which has a tag name <abc> <\abc>. The file2.txt has numbers fixed length numbers (1 number in each row): 1234 5678 1435 I need output to a ...
Tee-ess's user avatar
3votes
4answers
989views

Extracting sea level pressure from KML using Shell

I'm currently working on a little project; in a kml file called weatherdata.kml, I would like to extract the sea level pressure for each <Placemark> element. I'm trying to parse the information ...
user avatar
3votes
2answers
170views

Arrange code blocks sections based on dates and months

I have a file with repeated contents like this; <item> <date>August 24, 2021</date> <p>Text</p> </item> <item> <date>February 11, 2020</...
atheros's user avatar
3votes
3answers
3kviews

Sorting an XML file in UNIX with a Bash script?

I am trying to sort my XML file that looks like this by alphabetical order. This is a part of a larger bash script so it needs to work within that script: <Module> <Settings> &...
palacetrading's user avatar
0votes
1answer
402views

How to filter multiline with awk, grep and/or powershell

My scenario is I have a file that has the contents looking like this but longer. https://pastebin.com/q33wFdAX I need to remove each occurrence of <category>Games</category> </...
volitank's user avatar
3votes
2answers
957views

Shell script to remove child xml tags conditionally

I have a xml file having following content. <contracts> <clients> <client> <name>Nicol</name> <clientRef>123</clientRef> ...
Débora's user avatar
1vote
2answers
156views

awk: change line to itself parsed with command. Multiline text

I'm trying to answer a question. It involves using the command recode. A specific line has to be parsed by the command leaving the rest untouched. The file is an xml file. Example: <ITEM_ID>...
schrodingerscatcuriosity's user avatar
-2votes
1answer
400views

sed XML parse select text between tags with special characters while deleting other blocks

I am trying to parse an XML which consists of blocks between <JOB> and </JOB> , I am parsing within a do while loop , while reading the block between <JOB> and </JOB> , I am ...
sriram2207's user avatar
1vote
1answer
121views

Awk File processing to get last processed weekday

My application which does processing based on input XML's, processes the input files and adds the status to status_file.txt after processing. I am writing a script to identify the last processed day ...
iamsage's user avatar

153050per page
close